#ifndef CONFIG_H
#define CONFIG_H

#include <C8051F340.H>

sbit CONTROL_ON		= P0^0;
sbit PUMP_ON		= P0^1;
sbit SPEED_SENSE	= P0^2;
sbit CLUTCH_BRAKE	= P0^3;
sbit SPEED_RESUME	= P0^4;
sbit STATUS_LED		= P0^5;
sbit SPEED_UP		= P1^0;

//tire circumference in feet
#define TIRE_CIRCUMFERENCE								7.0f
#define ROTATIONS_PER_MILE								(5280.0f / TIRE_CIRCUMFERENCE)
#define ROTATIONS_PER_SECOND_PER_MILE_PER_HOUR			(ROTATIONS_PER_MILE / 3600.0f)
//seconds per timer0 over flow
#define CLOCK_INTERVAL									0.250f
#define ROTATIONS_PER_MILE_PER_HOUR_PER_CLOCK_INTERVAL	(ROTATIONS_PER_SECOND_PER_MILE_PER_HOUR * CLOCK_INTERVAL)	
//in miles per hour
#define VELOCITY_TOLERENCE								2.0f	

#endif
